package com.atguigu.system.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author 
 * @since 2025-03-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("biz_sku")
@ApiModel(value="Sku对象", description="")
public class Sku implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "关联的 SPU 的 ID，每个 SKU 都对应一个 SPU")
    private Integer spuId;

    @ApiModelProperty(value = "SKU 的颜色，若商品无颜色区分则可为空")
    private String color;

    @ApiModelProperty(value = "SKU 的尺寸，若商品无尺寸区分则可为空")
    private String size;

    @ApiModelProperty(value = "SKU 的价格，精确到小数点后两位")
    private BigDecimal price;

    @ApiModelProperty(value = "SKU 的品质描述，如优等品、合格品等")
    private String quality;

    @ApiModelProperty(value = "SKU 记录的创建时间，自动记录插入时的时间戳")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "SKU 记录的更新时间，插入或更新记录时自动更新")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "逻辑删除标志，0 表示未删除，1 表示已删除")
    @TableLogic
    private Integer isDeleted;


}
